import java.util.*;
    public class _Object{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
			int n=sc.nextInt();
			Object[] object=new Object[n];
			for (int i = 0; i < object.length; i++) {
			      String str=sc.nextLine();
			      if(str.equals("c")){
			    	  object[i]=new Computer();
			      }
			      else if(str.equals("d")){
			    	  object[i]=new Double(sc.nextDouble());
			      }
			      else if(str.equals("i")){
			    	  object[i]=new Integer(sc.nextInt());
			      }
			      else if(str.equals("s")){
			    	  object[i]=new String(sc.next());
			      }
			      else {
			    	  object[i]=null;
			      }
		  }
			for (int i = object.length-1; i >= 0; i--) {
				if(object[i]!=null) System.out.println(object[i]);
			}
		}
		
	
}